#include "bits/stdc++.h"
using namespace std;
int val[10010];
int main() {
    val[0] = 0;
    val[1] = 1;
    for(int i = 2;i <= 45;i ++) {
        val[i] = val[i - 1] + val[i - 2];
    }
    int a;
    cin>>a;
    cout<<val[a];
    return 0;
}